function formatterSeconds(s){
  if (isNaN(s)){
    return '00:00'
  }
  let hh=Math.floor(s/3600)
  let str=''
  if (hh!==0){
    str+=padStr(Math.floor(s/3600),2,'0','L')+':'
  }
  str+=padStr(Math.floor(s%3600/60),2,'0','L')+':'
  str+=padStr(Math.floor(s%3600%60),2,'0','L')
  return str
}

function padStr(str,toNum,padStr,direc){
  str=str.toString()
  direc=direc || 'L'
  padStr=padStr || '0'
  let toPadNum=toNum-str.length
  for (let i=0;i<toPadNum;i++){
    if (direc.toUpperCase()==="L"){
      str=padStr+str
    }else{
      str+=padStr
    }
  }
  return str
}

function setCfg(key,val){
  return window.localStorage.setItem(key,val)
}

function getCfg(key){
  return window.localStorage.getItem(key)
}


function getSuffix(name){
  let nameArr=name.split('.')
  return nameArr[nameArr.length-1]
}